import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}
// 设置获取cookie用户名
export function setUserName(name) {
  return Cookies.set('userName', name)
}
export function getUserName() {
  return Cookies.get('userName')
}
// 设置获取cookie用户头像
export function setavatar(name) {
  return Cookies.set('avatar', name)
}
export function getavatar() {
  return Cookies.get('avatar')
}
export function removeToken() {
  return Cookies.remove(TokenKey)
}
export function removeUserName() {
  return Cookies.remove('userName')
}
export function removeavatar() {
  return Cookies.remove('avatar')
}
